package com.ziyun.erp.modules.logistics.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.logistics.dao.ErpLogisticsItemDao;
import com.ziyun.erp.modules.logistics.entity.ErpLogisticsItemEntity;
import com.ziyun.erp.modules.logistics.service.ErpLogisticsItemService;


@Service("erpLogisticsItemService")
public class ErpLogisticsItemServiceImpl extends ServiceImpl<ErpLogisticsItemDao, ErpLogisticsItemEntity> implements ErpLogisticsItemService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ErpLogisticsItemEntity> page = this.selectPage(
                new Query<ErpLogisticsItemEntity>(params).getPage(),
                new EntityWrapper<ErpLogisticsItemEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public void saveBatchByLogisticsId(List<ErpLogisticsItemEntity> list, Integer logiId) {
        baseMapper.saveBatchByLogisticsId(list,logiId);
    }

}
